package it.danghongphat.database;


import java.sql.Connection;
import java.sql.DriverManager;

public class ConnectDatabases {
	Connection conn;
	DatabaseConfig databaseConfig=new DatabaseConfig();
	public ConnectDatabases() {
		try {
			Class.forName("oracle.jdbc.driver.OracleDriver");
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
	}
	Connection getConnection(){
		try{
			conn=DriverManager.getConnection(databaseConfig.getUrl(),databaseConfig.getUserName(),databaseConfig.getPassword());
		}catch(Exception e){
			e.printStackTrace();
		}
		return conn;
		
	}

}

